<?php 
$df = Yii::app()->dateFormatter;
//echo par($activeRecordLogs); 
?>
    <div id="<?php echo $viewId ?>_table" style="display:none;font-size: smaller;">
    <table>
        <thead>
            <tr>
                <th><?php echo CHtml::encode(ActiveRecordLog::model()->getAttributeLabel('timestamp')); ?></th>
                <th><?php echo CHtml::encode(ActiveRecordLog::model()->getAttributeLabel('userId')); ?></th>
                <th><?php echo CHtml::encode(ActiveRecordLog::model()->getAttributeLabel('action')); ?></th>
                <th><?php echo CHtml::encode(ActiveRecordLog::model()->getAttributeLabel('fieldName')); ?></th>
                <th><?php echo CHtml::encode(ActiveRecordLog::model()->getAttributeLabel('description')); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($activeRecordLogs as $data) : ?>
            <tr valign="top">
                <td><?php echo CHtml::encode($df->formatDateTime($data->timestamp,'medium','medium')); ?></td>
                <td><?php echo CHtml::encode(User::model()->findByPk($data->userId)->getFullName(User::NAMETYPE_FIRST1_LAST)); ?></td>
                <td><?php echo CHtml::encode(ActiveRecordLog::model()->actionOptions[$data->action]); ?></td>
                <td><?php echo CHtml::encode($data->fieldName); ?></td>
                <td><?php echo nl2br(CHtml::encode($data->description)); ?></td>
            </tr>
            <?php endforeach; ?>
        </tbody>
    </table>
    <p>
        <?php echo CHtml::link(Yii::t('site','View more...'),array('/admin/activeRecordLog/admin','ActiveRecordLog[modelName]' => get_class($this->model),'ActiveRecordLog[recordId]' => $this->model->getPrimaryKey())); ?>
    </p>
</div>
